<template>
	<view>
		<view class="flex list" v-for="(item,index) in list" :key="index" v-if="list.length>0">
			<image :src="item.userUrl" class="avatar"></image>
			<view style="flex: 1;">
				<view class="flex statusBox">
					<view class="name">{{item.userName}}</view>
					<view>推荐成功</view>
				</view>
				<!-- <view class="tel">{{item.masterName}}</view> -->
				<view style="margin-top: 30rpx;">推荐日期：{{item.createTime}}</view>
			</view>
		</view>
		<view class="kong" v-if="list.length==0">
			<image src="/static/index/listNull.png" mode="" class="listNull"></image>
			<view class="zanwu">暂无数据</view>
		</view>
	</view>
</template>
<script>
	import {
		myRecommend
	} from '../../common/api.js'
	export default {
		data() {
			return {
				list: []
			}
		},
		onShow() {
			this.myRecommend()
		},
		methods: {
			myRecommend() {
				myRecommend(uni.getStorageSync('userInfo').id).then(res => {
					this.list = [...res.result.firstRec, ...res.result.secondRec]
				})
			}
		}
	}
</script>
<style scoped>
	.statusBox {
		justify-content: space-between;
		flex: 1;
		color: #333333;
	}

	.tel {
		color: #333333;
		margin: 6rpx;
	}

	.name {
		color: #333333;
		font-size: 28rpx;
		font-weight: bold;
	}

	.avatar {
		width: 110rpx;
		height: 110rpx;
		margin-right: 26rpx;
	}

	.list {
		width: 644rpx;
		height: 108rpx;
		border-radius: 22rpx;
		background: #ffffff;
		margin: 28rpx 22rpx;
		padding: 40rpx 32rpx;
		color: #999999;
		font-size: 24rpx;
	}
</style>
<style>
	page {
		background: #f5f5f5;
	}

	.listNull {
		width: 170rpx;
		height: 200rpx;
		margin-bottom: 30rpx;
	}

	.kong {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 200rpx;
	}
</style>